<template>
  <div class="detail-base">
    <t-card title="订单详情">
      <div class="info-block">
        <div class="info-item">
          <h1>创建时间</h1>
          <span>
            {{ d.createDate }}
          </span>
        </div>
        <div class="info-item">
          <h1>业务单号</h1>
          <span>
            {{ d.orderNo }}
          </span>
        </div>
        <div class="info-item">
          <h1>支付时间</h1>
          <span>
            {{ d.payDate }}
          </span>
        </div>
        <div class="info-item">
          <h1>支付编号</h1>
          <span>
            {{ d.id }}
          </span>
        </div>

        <div class="info-item">
          <h1>支付单号</h1>
          <span>
            {{ d.tradeNo }}
          </span>
        </div>
        <div class="info-item">
          <h1>支付额度</h1>
          <span>
            {{ d.payAmount }}
          </span>
        </div>
        <div class="info-item">
          <h1>支付渠道</h1>
          <span>
            {{ d.paymentChannelText }}
          </span>
        </div>
        <div class="info-item">
          <h1>支付场景</h1>
          <span>
            {{ d.paymentSceneText }}
          </span>
        </div>
        <div class="info-item">
          <h1>商户号</h1>
          <span>
            {{ d.merchantId }}
          </span>
        </div>
        <div class="info-item">
          <h1>APPID</h1>
          <span>
            {{ d.appId }}
          </span>
        </div>
        <div class="info-item">
          <h1>购买者</h1>
          <span>
            {{ d.buyerId }}
          </span>
        </div>
        <div class="info-item">
          <h1>附件信息</h1>
          <span>
            {{ d.attach }}
          </span>
        </div>

        <!-- <div class="info-item">
          <h1>支付编号</h1>
          <span>
            {{ d.id }}
          </span>
        </div>
        <div class="info-item">
          <h1>支付编号</h1>
          <span>
            {{ d.id }}
          </span>
        </div> -->
      </div>
    </t-card>

    <!-- <t-card title="变更记录" class="container-base-margin-top">
      <t-steps class="detail-base-info-steps" layout="vertical" theme="dot" :current="1">
        <t-step-item title="上传合同附件" content="这里是提示文字" />
        <t-step-item title="修改合同金额" content="这里是提示文字" />
        <t-step-item title="新建合同" content="2020-12-01 15:00:00 管理员-李川操作" />
      </t-steps>
    </t-card> -->
  </div>
</template>

<script lang="ts">
export default {
  name: 'OrderDetailIntance',
};
</script>

<script setup lang="ts">
import { Ref, ref, onMounted } from 'vue';
import { useRouter } from 'vue-router';
import { getOrderDetail } from '@/api/order';
import { PaymentOrder } from '@/api/model/orderModel';

const router = useRouter();
const { id } = router.currentRoute.value.query;

const d: Ref<PaymentOrder | any> = ref({});
const featchData = () => {
  if (id === '0') {
    router.push('/result/404');
    return;
  }
  getOrderDetail(Number(id)).then((ret) => {
    d.value = ret;
  });
};
onMounted(() => {
  featchData();
});
</script>

<style lang="less" scoped>
@import url('./index.less');
</style>
